package com.fmblzf.library.adapter;

import android.content.Context;
import android.widget.BaseAdapter;

import java.util.List;

/**
 * @设计： ZF
 * @类描述：基类适配器
 * @创建时间：2014-09-11
 */
public abstract class BaseSuperAdapter<T> extends BaseAdapter {

    protected Context mContext;//上下文内容

    public void setmList(List<T> mList) {
        this.mList = mList;
    }

    protected List<T> mList;//数据集

    public BaseSuperAdapter(Context context, List<T> list) {
        this.mContext = context;
        this.mList = list;
    }

    @Override
    public int getCount() {
        return mList == null ? 0 : mList.size();
    }

    @Override
    public T getItem(int position) {
        return mList == null ? null : mList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

}
